//
//  SYTableViewCell.m
//  HimalayaMusic
//
//  Created by dllo on 16/1/15.
//  Copyright © 2016年 WXCLegendary. All rights reserved.
//

#import "SYTableViewCell.h"

@implementation SYTableViewCell


-(void)setModel:(SYModel *)model {
    if (_model != model) {
        _model = model;
    }
    [self.imageViews sd_setImageWithURL:[NSURL URLWithString:model.coverMiddle]];
    self.titileLabel.text = model.title;
    self.playLabel.text = [HeperTools SharePlayCount:model.playtimes.intValue];
    self.timeLabel.text = [NSString stringWithFormat:@"%02ld:%02ld", model.duration.integerValue / 60, model.duration.integerValue % 60];
    
    
    


    
    self.commentLabel.text = model.comments.stringValue;
    self.playImage.image = [UIImage imageNamed:@"find_albumcell_play@2x"];
    self.timeImage.image = [UIImage imageNamed:@"find_specialicon@2x"];
    self.commentImage.image = [UIImage imageNamed:@"iconfont-pinglun"];
    self.commentLabel.text = model.comments.stringValue;
    self.updateLabel.text = [TimeInteval shareGetUTCFormateDate:[NSString stringWithFormat:@"%ld", model.createdAt.integerValue / 1000] ];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
